START HERE

This is a tutorial for Zetteldeft, a Zettelkasten system on top of Deft.

This file guides you through a Zetteldeft installation and basic setup.

If you use MELPA and use-package, installing is as easy as:

(use-package deft
  :ensure t
  :init
    (setq deft-extensions '("org" "md" "txt")
          deft-use-filename-as-title t))

(use-package zetteldeft
  :ensure t
  :after deft
  :config (zetteldeft-set-classic-keybindings))

Hit C-c C-c in the code block above to execute the code.

This will set up default keybindings behind the C-c d prefix. If you use evil and leader.el, you might prefer different bindings (see §2020-02-15-1508). For installation on spacemacs, see §2020-04-18-1304.

Next, we need configure some settings.

Point deft-dir to the tutorial files (i.e., the current directory) and tell Deft to refresh:

(setq deft-directory default-directory)

(deft)
(deft-refresh)

Make sure you use the default configuration. If you already use Zetteldeft and have a personal config, override it with the code below.

(setq zetteldeft-link-indicator "§"
      zetteldeft-id-format "%Y-%m-%d-%H%M"
      zetteldeft-id-regex "[0-9]\\{4\\}\\(-[0-9]\\{2,\\}\\)\\{3\\}"
      zetteldeft-tag-regex "[#@][a-z-]+")

Finally, I advise to enable visual-line-mode so that long lines are wrapped at the window’s edges. I use it to write these notes, so you’ll need it to read them.

(visual-line-mode t)

For a better reading experience I advise writeroom-mode, but this is not strictly necessary.

Now you are ready to move to note §2020-02-15-1247.

Hit M-x zetteldeft-follow-link or C-c d f, and pick a link to follow.